import{d as $,l as g,V as k,a as o,o as l,b as c,w as t,q as w,W as B,e as s,m as C,f as b,E as D,A as G,F as N,D as T,c as P}from"./index-c80Lh_is.js";import{N as A}from"./NavTabs-Gqjwuy8q.js";const S=$({__name:"DataPlaneDetailTabsView",props:{isGatewayView:{type:Boolean,required:!1,default:!1}},setup(h){var _;const{t:p}=g(),v=k(),n=h,x=(((_=v.getRoutes().find(a=>a.name===`${n.isGatewayView?"gateway":"data-plane"}-detail-tabs-view`))==null?void 0:_.children)??[]).map(a=>{var m,r;const d=typeof a.name>"u"?(m=a.children)==null?void 0:m[0]:a,i=d.name,u=((r=d.meta)==null?void 0:r.module)??"";return{title:p(`${n.isGatewayView?"gateways":"data-planes"}.routes.item.navigation.${i}`),routeName:i,module:u}});return(a,d)=>{const i=o("RouteTitle"),u=o("RouterView"),f=o("DataSource"),m=o("AppView"),r=o("RouteView");return l(),c(r,{name:"data-plane-detail-tabs-view",params:{mesh:"",dataPlane:""}},{default:t(({route:e})=>[s(m,{breadcrumbs:[{to:{name:"mesh-detail-view",params:{mesh:e.params.mesh}},text:e.params.mesh},{to:{name:`${n.isGatewayView?"gateway":"data-plane"}-list-view`,params:{mesh:e.params.mesh}},text:w(p)(`${n.isGatewayView?"gateways":"data-planes"}.routes.item.breadcrumbs`)}]},{title:t(()=>[C("h1",null,[s(B,{text:e.params.dataPlane},{default:t(()=>[s(i,{title:w(p)(`${n.isGatewayView?"gateways":"data-planes"}.routes.item.title`,{name:e.params.dataPlane})},null,8,["title"])]),_:2},1032,["text"])])]),default:t(()=>[b(),s(f,{src:`/meshes/${e.params.mesh}/dataplane-overviews/${e.params.dataPlane}`},{default:t(({data:y,error:V})=>[V?(l(),c(D,{key:0,error:V},null,8,["error"])):y===void 0?(l(),c(G,{key:1})):(l(),P(N,{key:2},[s(A,{class:"route-data-plane-view-tabs",tabs:w(x)},null,8,["tabs"]),b(),s(u,null,{default:t(R=>[(l(),c(T(R.Component),{data:y},null,8,["data"]))]),_:2},1024)],64))]),_:2},1032,["src"])]),_:2},1032,["breadcrumbs"])]),_:1})}}});export{S as default};
